package com.alienlab.finder.service;

import com.alienlab.finder.domain.AppUser;

import com.alienlab.finder.service.dto.UserInfoDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.Optional;

/**
 * Service Interface for managing AppUser.
 */
public interface AppUserService {

    /**
     * Save a appUser.
     *
     * @param appUser the entity to save
     * @return the persisted entity
     */
    AppUser save(AppUser appUser);

    /**
     * Get all the appUsers.
     *
     * @param pageable the pagination information
     * @return the list of entities
     */
    Page<AppUser> findAll(Pageable pageable);


    /**
     * Get the "id" appUser.
     *
     * @param id the id of the entity
     * @return the entity
     */
    Optional<AppUser> findOne(Long id);

    /**
     * Delete the "id" appUser.
     *
     * @param id the id of the entity
     */
    void delete(Long id);

    //用户登录数据解析
    UserInfoDTO userLogin(String code) throws Exception;


    //用户个人信息修改
    AppUser updateAppuserInfo(String open_id,String name,int  age,String phone,String we_chat,String address) throws Exception;

    void creatOrupdateSessionid(String open_id,String session_id) throws Exception;


    AppUser updateWechatname(String open_id,String wechatname,String headimage) throws Exception;

    AppUser getPersonnalInfo(String open_id) throws Exception;



}
